<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('信息审核修改')"/>
</head>
<body>
<form class="layui-form" action=""  th:object="${Detection}">
    <div class="mainBox">
        <div class="main-container">
            <div class="main-container">

						<div class="layui-form-item layui-hide">
		                    <label class="layui-form-label">id</label>
		                    <div class="layui-input-block">
		                        <input type="text" th:value="*{id}" name="id" lay-verify="title"
		                               autocomplete="off" class="layui-input">
		                    </div>
		                </div>
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">客户名称</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{customer}" type="text" name="customer" autocomplete="off" placeholder="客户名称" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">型号规格／测量范围</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{modelspecifications}" type="text" name="modelspecifications" autocomplete="off" placeholder="型号规格／测量范围" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">任务单号</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{taskno}" type="text" name="taskno" autocomplete="off" placeholder="任务单号" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">制造厂商</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{manufacturer}" type="text" name="manufacturer" autocomplete="off" placeholder="制造厂商" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">准确度等级／MPE1</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{mpe1}" type="text" name="mpe1" autocomplete="off" placeholder="准确度等级／MPE1" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">出场编号</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{exitnum}" type="text" name="exitnum" autocomplete="off" placeholder="出场编号" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">主要标准器名称</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{mainstandard}" type="text" name="mainstandard" autocomplete="off" placeholder="主要标准器名称" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">测量范围</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{mrange}" type="text" name="mrange" autocomplete="off" placeholder="测量范围" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">准确度等级／MPE2</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{mpe2}" type="text" name="mpe2" autocomplete="off" placeholder="准确度等级／MPE2" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">证书编号</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{certificateno}" type="text" name="certificateno" autocomplete="off" placeholder="证书编号" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">标准砝码</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{smw}" type="text" name="smw" autocomplete="off" placeholder="标准砝码" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">证书有效期至</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{certificateutil}" type="text" name="certificateutil" autocomplete="off" placeholder="证书有效期至" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">温度℃</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{temperature}" type="text" name="temperature" autocomplete="off" placeholder="温度℃" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">湿度%RH</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{humidity}" type="text" name="humidity" autocomplete="off" placeholder="湿度%RH" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">大气压力hPa</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{atmospheric}" type="text" name="atmospheric" autocomplete="off" placeholder="大气压力hPa" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">空气密度mg/cm³</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{airdensity}" type="text" name="airdensity" autocomplete="off" placeholder="空气密度mg/cm³" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">材料</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{stuff}" type="text" name="stuff" autocomplete="off" placeholder="材料" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">文件存放地址</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{fileurl}" type="text" name="fileurl" autocomplete="off" placeholder="文件存放地址" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">检定依据</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{according}" type="text" name="according" autocomplete="off" placeholder="检定依据" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">计量标准使用前工作状况</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{prework}" type="text" name="prework" autocomplete="off" placeholder="计量标准使用前工作状况" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">计量标准使用后工作状况</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{afterwork}" type="text" name="afterwork" autocomplete="off" placeholder="计量标准使用后工作状况" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">检定项目</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{project}" type="text" name="project" autocomplete="off" placeholder="检定项目" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">检定地点</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{inspectionsite}" type="text" name="inspectionsite" autocomplete="off" placeholder="检定地点" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">检定员</label>
		                    <div class="layui-input-block">
		                    	
		                    	<select name="verifier"  th:field="*{verifier}" th:with="type=${@dict.getType('name')}">
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
		                    	
		                    </div>
		                </div>
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">核验员</label>
		                    <div class="layui-input-block">
		                    	
		                    	<select name="checkver"  th:field="*{checkver}" th:with="type=${@dict.getType('str')}">
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
		                    	
		                    </div>
		                </div>
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">检定时间</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{qdtime}" type="text" name="qdtime" autocomplete="off" placeholder="检定时间" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">有效日期</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{yxtime}" type="text" name="yxtime" autocomplete="off" placeholder="有效日期" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">检定结论</label>
		                    <div class="layui-input-block">
		                    	
		                    	<select name="verdict"  th:field="*{verdict}" th:with="type=${@dict.getType('String')}">
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
		                    	
		                    </div>
		                </div>
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label">创建时间</label>
		                    <div class="layui-input-block">
		                        <input th:value="*{createtime}" type="text" name="createtime" autocomplete="off" placeholder="创建时间" class="layui-input">
		                    </div>
		                </div>
					                
		
					
						<div class="layui-form-item">
		                    <label class="layui-form-label"></label>
		                    <div class="layui-input-block">
		                        <input th:value="*{updatetime}" type="text" name="updatetime" autocomplete="off" placeholder="" class="layui-input">
		                    </div>
		                </div>
					                

            </div>
        </div>
    </div>
    <div class="bottom">
        <div class="button-container">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit=""
                    lay-filter="detection-update">
                <i class="layui-icon layui-icon-ok"></i>
				提交
            </button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
				重置
            </button>
        </div>
    </div>
</form>
<th:block th:include="include :: footer"/>
<script>
    layui.use(['form','laydate','jquery'], function () {
        let form = layui.form;
        let $ = layui.jquery;
        let MODULE_PATH = rootPath+"/DetectionController";


        form.on('submit(detection-update)', function (data) {
        	let loader = layer.load();
            $.ajax({
                url: MODULE_PATH+'/edit',
                data: data.field,
                dataType: 'json',
                contentType: 'application/x-www-form-urlencoded',
                type: 'post',
                success: function (result) {
                    if (result.code==200) {
                        layer.msg(result.msg, {icon: 1, time: 1000}, function () {
                            parent.layer.close(parent.layer.getFrameIndex(window.name));//关闭当前页
                            parent.layui.table.reload("detection-table");
                            layer.close(loader);
                        });
                    } else {
                        layer.msg(result.msg, {icon: 2, time: 1000});
                        layer.close(loader);
                    }
                }
            })
            return false;
        });
    })
</script>
</body>
</html>